package main

import (
	"leaf"
	lconf "leaf/conf"
	mysql "leaf/db/mysqldb"
	"leaf/db/redisdb"
	"server/conf"
	"server/game"
	"server/gate"
	"server/login"
)

func main() {
	lconf.LogLevel = conf.Server.LogLevel
	lconf.LogPath = conf.Server.LogPath
	lconf.LogFlag = conf.LogFlag
	lconf.ConsolePort = conf.Server.ConsolePort
	lconf.ProfilePath = conf.Server.ProfilePath
	//开启mysql
	mysql.Run_mysql(conf.Server.MysqlAddr)
	//开去Redis
	redisdb.Run_redis(conf.Server.RedisAddr)
	//开启模块服务
	leaf.Run(
		game.Module,
		gate.Module,
		login.Module,
	)
}
